using System;
using System.ComponentModel;
using System.ServiceModel.DomainServices.Client.ApplicationServices;
using System.Windows;
using System.Windows.Input;

namespace AR.ViewModels.Commands
{
    public class SearchCandidat : ICommand
    {
         private ListeCandidatViewModel _viewModel;

         public SearchCandidat(ListeCandidatViewModel viewModel)
        {
            _viewModel = viewModel;
        }


        public bool CanExecute(object parameter)
        {
            //return (_viewModel.SelectedCapture != null) ? true : false;
            return true;
        }

        public void Execute(object parameter)
        {
            _viewModel.searchCandidat();
        }

        public event EventHandler CanExecuteChanged;

        protected virtual void OnCanExecuteChanged(EventArgs e)
        {
            var canExecuteChanged = CanExecuteChanged;

            if (canExecuteChanged != null)
                canExecuteChanged(this, e);
        }
       
    }
}